#!/usr/bin/env python3
# -*- coding: utf-8 -*-

__author__ = 'lumeng'

'''
@filename forms
@@created on 2017-11-26
@poject:python_django_demo
@auther:teffy
'''

from django import forms

from .models import Topic, Entry


class TopicForm(forms.ModelForm):
    class Meta:
        model = Topic
        fields = ['text']
        labels = {'text': ''}


class EntryForm(forms.ModelForm):
    class Meta:
        model = Entry
        fields = ['text']
        labels = {'text': ''}
        widgets = {'text': forms.Textarea(attrs={'cols': 80})}
